package com.dhcc.model;

import javax.persistence.*;

/**
 * Created by guorui on 2017/3/17.
 */
@Entity
@Table(name = "tb_wdt", schema = "test", catalog = "")
public class Wdt {
    private int wdtId;
    private String wdtQue;
    private String wdtAns;
    private int cId;

    @Id
    @Column(name = "wdt_id", nullable = false)
    public int getWdtId() {
        return wdtId;
    }

    public void setWdtId(int wdtId) {
        this.wdtId = wdtId;
    }

    @Basic
    @Column(name = "wdt_que", nullable = false, length = 100)
    public String getWdtQue() {
        return wdtQue;
    }

    public void setWdtQue(String wdtQue) {
        this.wdtQue = wdtQue;
    }

    @Basic
    @Column(name = "wdt_ans", nullable = false, length = -1)
    public String getWdtAns() {
        return wdtAns;
    }

    public void setWdtAns(String wdtAns) {
        this.wdtAns = wdtAns;
    }

    @Basic
    @Column(name = "c_id", nullable = false)
    public int getcId() {
        return cId;
    }

    public void setcId(int cId) {
        this.cId = cId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Wdt wdt = (Wdt) o;

        if (wdtId != wdt.wdtId) return false;
        if (cId != wdt.cId) return false;
        if (wdtQue != null ? !wdtQue.equals(wdt.wdtQue) : wdt.wdtQue != null) return false;
        if (wdtAns != null ? !wdtAns.equals(wdt.wdtAns) : wdt.wdtAns != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = wdtId;
        result = 31 * result + (wdtQue != null ? wdtQue.hashCode() : 0);
        result = 31 * result + (wdtAns != null ? wdtAns.hashCode() : 0);
        result = 31 * result + cId;
        return result;
    }
}
